package com.lebang.feign.draw;

import com.lebang.model.RequestUserInfo;
import com.lebang.feign.draw.fallback.DrawMemberAdressFallback;
import com.lebangweb.response.JsonData;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author xwj
 */
@FeignClient(name = "wangzhuan-draw", contextId = "wangzhuan-draw-member", fallback = DrawMemberAdressFallback.class)
public interface DrawMemberAdressFeign {

    /**
     * 修改--app
     *
     * @return 返回结果
     */
    @ApiOperation("修改")
    @PostMapping("/draw/drawmemberadress/update")
    JsonData update(@RequestBody RequestUserInfo request,
                    @RequestParam(value = "id", required = false) Integer id,
                    @RequestParam(value = "name", required = false) String name,
                    @RequestParam(value = "phone", required = false) Integer phone,
                    @RequestParam(value = "adress", required = false) String adress,
                    @RequestParam(value = "isDefaultAdress", required = false) Integer isDefaultAdress);

    /**
     * 新增--app
     *
     * @return 返回结果
     */
    @ApiOperation("新增")
    @PostMapping("/draw/drawmemberadress/insert")
    JsonData insert(@RequestBody RequestUserInfo request,
                    @RequestParam(value = "name", required = false) String name,
                    @RequestParam(value = "phone", required = false) Integer phone,
                    @RequestParam(value = "adress", required = false) String adress,
                    @RequestParam(value = "isDefaultAdress", required = false) Integer isDefaultAdress);

    /**
     * 根据id获取详情--app
     *
     * @return 返回结果
     */
    @ApiOperation("根据id获取详情")
    @PostMapping("/draw/drawmemberadress/info")
    JsonData info(@RequestParam(value = "id", required = false) Integer id);

    /**
     * 根据id删除--app
     *
     * @return 返回结果
     */
    @ApiOperation("根据id删除")
    @PostMapping("/draw/drawmemberadress/delete")
    JsonData delete(@RequestParam(value = "id", required = false) Integer id);

    /**
     * 地址信息--app
     *
     * @return 返回结果
     */
    @ApiOperation("地址信息")
    @PostMapping("/draw/drawmemberadress/list")
    JsonData list(@RequestBody RequestUserInfo request);


}
